#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include <QFileDialog>
#include <QPixmap>
#include <imgbox.h>
#include <QDebug>
#include <QLabel>

const int SIZE = 270;
const int LEN = 256;
namespace Ui
{
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    imgbox* box;
private:
    Ui::MainWindow *ui;
    void openfile();
    imgbox * orgbox;
    imgbox * newbox;
    QString fn;
    QImage img;
    void prework();
    int cnt[SIZE];
    int mat[SIZE];
private slots:
    void on_action_5_triggered();
    void on_action_4_triggered();
    void on_action_triggered();
};

#endif // MAINWINDOW_H
